Skip to content

feat: WFC3 (UVIS + IR) reduction support (phase 2) - #5

Merged
Jammy2211 merged 4 commits into
mainfrom
feature/wfc3-reduction
Jul 9, 2026
Merged

feat: WFC3 (UVIS + IR) reduction support (phase 2)#5
Jammy2211 merged 4 commits into
mainfrom
feature/wfc3-reduction

Conversation

@Jammy2211

Copy link
Copy Markdown
Contributor

Implements WFC3 (UVIS + IR) support per #4, rebased onto main after PR #3 merged. Autonomous run (--auto supervised), parked at ship sign-off.

What this adds

  • instruments/wfc3_uvis.py — the ACS-like path: _flc CTE-corrected, iref/references/hst/wfc3, native 0.0396″/pix (also the recommended output scale), 63 ke- full well.
  • instruments/wfc3_ir.py — the different path: _flt (no CTE correction; up-the-ramp CR rejection), native 0.128″/pix with recommended 0.065″ output, 78 ke- full well.
  • InstrumentAdapter.recommended_final_scale — adapter-owned sampling recommendation; TargetSpec.final_scale stays the user dial (ACS default unchanged).
  • docs/design/wfc3.md — per-stage deltas vs ACS, the hst-lens notebook coverage audit, and two integration findings (below); roadmap section ticked to in-progress.
  • scripts/reduce_j0252_wfc3.py — both channels on SDSS J0252+0039.
  • Cross-channel fix in phase-1 code: the PSF star saturation cap divided full well by mosaic-total EXPTIME (~8× too strict on multi-exposure stacks, physically wrong for IR ramps); now uses the longest single exposure.

Integration results (real MAST data)

UVIS F390W (Bayer dials: 0.0396″, pixfrac 1.0) IR F160W (0.065″, pixfrac 1.0, 14″ cutout)
exposures 16 (deep program) 8 (4794s, prog 11202)
units e-/s ✓ e-/s ✓
WHT uniformity 0.107 ✓ 0.129 ✓
R applied 1.500 (= shift-and-add, matches Bayer config) 2.370 (fine-grid s≈0.51, honestly reported)
sky RMS 0.00226 e-/s vs published ~0.002 (1.13×, within quoting precision) 0.00535 e-/s
ePSF tier 1, 35 stars tier 1, 71 stars (post star-cap fix)

Two loud-failure demonstrations (the guards working as designed, both documented in wfc3.md): IR at pixfrac 0.8 left zero-weight speckle → guard refused to package; and the oversized 18.3″ cutout clipped a detector-defect blob 8.5″ off-target → matched to the ACS 14″ sky footprint (215 px at 0.065″).

API Changes

New adapters wfc3_uvis, wfc3_ir; new InstrumentAdapter.recommended_final_scale field (defaulted — existing adapter construction unaffected). No other PyAuto* repo touched.

Scripts Changed

New scripts/reduce_j0252_wfc3.py (UVIS anchor validation + IR discovery/validation). Design docs updated.

Gate legs (supervised — parked at sign-off)

  1. Tests: 62/62 (53 phase-1 regression + 9 WFC3). Downstream suites n/a (no dependents).
  2. Smoke: n/a — no workspace surface consumes autoreduce (stated per contract).
  3. Review: finder+verify on the phase-2 delta → 1 HIGH (saturation-cap physics, fixed, IR re-validated end-to-end), 2 LOW (stale doc path, HAP 'detection' pseudo-filter — both fixed). Clean on constants, coordinate math, adapter boundary, and test/network conventions.
  4. Heart: YELLOW — same pre-existing organism reason set as PR feat: HST/ACS reduction pipeline (phase 1) #3; none related to this repo. Maintainer acknowledged at sign-off (issue feat: WFC3 (UVIS + IR) reduction support (phase 2) #4), authorizing PR-open.

🤖 Generated with Claude Code

https://claude.ai/code/session_01WNhuuvZLgZjHvWBGdhUst3

Jammy2211 and others added 4 commits July 8, 2026 21:10
wfc3_uvis (ACS-like: _flc, iref, native 0.0396) and wfc3_ir (_flt, no
CTE, native 0.128, recommended 0.065 output); recommended_final_scale
adapter field; docs/design/wfc3.md per-stage deltas + hst-lens coverage
audit; 62 tests green (ACS suite untouched).

Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01WNhuuvZLgZjHvWBGdhUst3
…CS-matched cutout footprint

Finite-noise guard caught zero-weight speckle at pixfrac 0.8 and a
detector-defect blob 8.5" off-target inside the oversized 18.3" cutout;
both dial adjustments documented in docs/design/wfc3.md.

Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01WNhuuvZLgZjHvWBGdhUst3
…tection' pseudo-filter, doc script path

The peakmax cap divided full well by mosaic-total EXPTIME, ~8x too
strict on multi-exposure stacks (physically wrong for IR ramps and
over-conservative for CCD stacks); now uses the longest single
exposure.

Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01WNhuuvZLgZjHvWBGdhUst3
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant